let logger = require("pomelo-logger").getLogger(__filename);

module.exports = function (app) {
    return new Handler(app);
};

let Handler = function (app) {
    this.app = app;
};

Handler.prototype.getYuanBaoRooms = function (msg, session, callback) {
    let niuniuTableService = this.app.get("niuniuTableService");
    let rooms = niuniuTableService.getSystemYuanBaoRooms();
    let tables = niuniuTableService.getVisiblePlayerYuanBaoTables();
    callback(null, {
        "resultCode": 0,
        "message": "ok",
        "rooms": rooms,
        "tables": tables
    });
};